Combined group ecc protection and subgroup parity protection

ABSTRACT

A method and system are disclosed for providing combined error code protection and subgroup parity protection for a given group of n bits. The method comprises the steps of identifying a number, m, of redundant bits for said error protection; and constructing a matrix P, wherein multiplying said given group of n bits with P produces m redundant error correction code (ECC) protection bits, and two columns of P provide parity protection for subgroups of said given group of n bits. In the preferred embodiment of the invention, the matrix P is constructed by generating permutations of m bit wide vectors with three or more, but an odd number of, elements with value one and the other elements with value zero; and assigning said vectors to rows of the matrix P.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of copending U.S. patent application Ser. No. 13/918,127, filed Jun. 14, 2013, which is a divisional application of U.S. patent application Ser. No. 11/768,527, filed Jun. 26, 2007, now U.S. Pat. No. 8,468,416. The entire contents and disclosures of U.S. patent application Ser. Nos. 13/918,127 and 11/768,527 are hereby incorporated herein by reference.

The present invention is related to the following commonly-owned, co-pending United States Patent Applications filed on even date herewith, the entire contents and disclosure of each of which is expressly incorporated by reference herein as if fully set forth herein. U.S. patent application Ser. No. 11/768,777, now U.S. Pat. No. 8,230,433 issued Jul. 24, 2012 for “A SHARED PERFORMANCE MONITOR IN A MULTIPROCESSOR SYSTEM”; U.S. patent application Ser. No. 11/768,645, now U.S. Pat. No. 8,258,490 issued Sep. 4, 2012 for “OPTIMIZED COLLECTIVES USING A DMA ON A PARALLEL COMPUTER”; U.S. patent application Ser. No. 11/768,781, now U.S. Pat. No. 7,694,035 issued Apr. 6, 2012, for “DMA SHARED BYTE COUNTERS IN A PARALLEL COMPUTER”; U.S. patent application Ser. No. 11/768,784, now U.S. Pat. No. 7,788,334 issued Aug. 31, 2010 for “MULTIPLE NODE REMOTE MESSAGING”; U.S. patent application Ser. No. 11/768,697, now U.S. Pat. No. 8,103,832 issued Jan. 24, 2012 for “A METHOD AND APPARATUS OF PREFETCHING STREAMS OF VARYING PREFETCH DEPTH”; U.S. patent application Ser. No. 11/768,532, now U.S. Pat. No. 7,877,551 issued Jan. 25, 2011, for “PROGRAMMABLE PARTITIONING FOR HIGH-PERFORMANCE COHERENCE DOMAINS IN A MULTIPROCESSOR SYSTEM”; U.S. patent application Ser. No. 11/768,857, now U.S. Pat. No. 7,827,391 issued Nov. 2, 2010 for “METHOD AND APPARATUS FOR SINGLE-STEPPING COHERENCE EVENTS IN A MULTIPROCESSOR SYSTEM UNDER SOFTWARE CONTROL”; U.S. patent application Ser. No. 11/768,547, now U.S. Pat. No. 7,669,012 issued Feb. 23, 2010 for “INSERTION OF COHERENCE EVENTS INTO A MULTIPROCESSOR COHERENCE PROTOCOL”; U.S. patent application Ser. No. 11/768,791, now U.S. Pat. No. 7,680,971 issued Mar. 16, 2010 for “METHOD AND APPARATUS TO DEBUG AN INTEGRATED CIRCUIT CHIP VIA SYNCHRONOUS CLOCK STOP AND SCAN”; U.S. patent application Ser. No. 11/768,795, now U.S. Pat. No. 7,802,025 issued Sep. 21, 2010 for “DMA ENGINE FOR REPEATING COMMUNICATION PATTERNS”; U.S. patent application Ser. No. 11/768,799, now U.S. Pat. No. 7,680,971 issued Mar. 16, 2010 for “METHOD AND APPARATUS FOR A CHOOSE-TWO MULTI-QUEUE ARBITER”; U.S. patent application Ser. No. 11/768,800, for “METHOD AND APPARATUS FOR EFFICIENTLY TRACKING QUEUE ENTRIES RELATIVE TO A TIMESTAMP”; U.S. patent application Ser. No. 11/768,572, now U.S. Pat. No. 7,701,846 issued Apr. 20, 2010 for “BAD DATA PACKET CAPTURE DEVICE”; U.S. patent application Ser. No. 11/768,593, for “EXTENDED WRITE COMBINING USING A WRITE CONTINUATION HINT FLAG”; U.S. patent application Ser. No. 11/768,805, now U.S. Pat. No. 7,793,038 issued Sep. 7, 2010, for “A SYSTEM AND METHOD FOR PROGRAMMABLE BANK SELECTION FOR BANKED MEMORY SUBSYSTEMS”; U.S. patent application Ser. No. 11/768,905, now U.S. Pat. No. 7,761,687 issued Jul. 20, 2010, for “AN ULTRASCALABLE PETAFLOP PARALLEL SUPERCOMPUTER”; U.S. patent application Ser. No. 11/768,810, now U.S. Pat. No. 8,108,738 issued Jan. 31, 2012 for “SDRAM DDR DATA EYE MONITOR METHOD AND APPARATUS”; U.S. patent application Ser. No. 11/768,812, now U.S. Pat. No. 7,797,503 issued Sep. 14, 2012 for “A CONFIGURABLE MEMORY SYSTEM AND METHOD FOR PROVIDING ATOMIC COUNTING OPERATIONS IN A MEMORY DEVICE”; U.S. patent application Ser. No. 11/768,559, now U.S. Pat. No. 8,010,875 issued Aug. 30, 2011, for “ERROR CORRECTING CODE WITH CHIP KILL CAPABILITY AND POWER SAVING ENHANCEMENT”; U.S. patent application Ser. No. 11/768,552, now U.S. Pat. No. 7,873,843, for “STATIC POWER REDUCTION FOR MIDPOINT-TERMINATED BUSSES”; U.S. patent application Ser. No. 11/768,669, now U.S. Pat. No. 7,984,448 issued Jul. 19, 2011 for “A MECHANISM TO SUPPORT GENERIC COLLECTIVE COMMUNICATION ACROSS A VARIETY OF PROGRAMMING MODELS”; U.S. patent application Ser. No. 11/768,813, now U.S. Pat. No. 8,032,92 issued Oct. 4, 2011 for “MESSAGE PASSING WITH A LIMITED NUMBER OF DMA BYTE COUNTERS”; U.S. patent application Ser. No. 11/768,619, now U.S. Pat. No. 7,738,443 issued Jun. 15, 2010 for “ASYNCRONOUS BROADCAST FOR ORDERED DELIVERY BETWEEN COMPUTE NODES IN A PARALLEL COMPUTING SYSTEM WHERE PACKET HEADER SPACE IS LIMITED”; U.S. patent application Ser. No. 11/768,682, for “HARDWARE PACKET PACING USING A DMA IN A PARALLEL COMPUTER”; and U.S. patent application Ser. No. 11/768,752, now U.S. Pat. No. 8,001,401 issued Aug. 16, 2011 for “POWER THROTTLING OF COLLECTIONS OF COMPUTING ELEMENTS”.

GOVERNMENT RIGHTS

This invention was made with Government support under Contract No.: B554331, awarded by Department of Energy. The Government has certain rights to this invention.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention generally relates to computer memory systems, and more specifically, to content protection of computer memory using redundancy.

2. Background Art

The small size of computer transistors and capacitors, combined with transient electrical and electromagnetic phenomena, cause occasional errors in stored information in computer memory systems. Therefore, even well designed and generally reliable memory systems are susceptible to memory device failures.

In an effort to minimize the effects of these memory device failures, various error-checking schemes have been developed to detect, and in some cases correct, errors in messages read from memory. Many of these checking schemes use redundant information, stored in the computer memory, to ensure data integrity. The simplest error detection scheme is the parity bit. A parity bit is an extra bit included with a binary data message or data word to make the total number of 1's in the message either odd or even. For “even parity” systems, the parity bit is set to make the total number of 1's in the message even. For “odd parity” systems, the parity bit is set to make the total number of 1's in the message odd. For example, in a system utilizing odd parity, a message having two 1's would have its parity bit set to 1, thereby making the total number of 1's odd. Then, the message including the parity bit is transmitted and subsequently checked at the receiving end for errors. An error results if the parity of the data bits in the message does not correspond to the parity bit transmitted. As a result, single bit errors can be detected. However, since there is no way to detect which particular bit is in error, correction is not possible. Furthermore, if two or any even number of bits are in error, the parity will be correct and no error will be detected. Parity therefore is capable of detecting only odd numbers of errors and is not capable of correcting any bits determined to be in error.

Error correction codes (ECCs) have thus been developed to not only detect but also correct bits determined to be in error. ECCs utilize multiple parity check bits stored with the data message in memory. Each check bit is a parity bit for a group of bits in the data message. When the message is read from memory, the parity of each group, including the check bit, is evaluated. If the parity is correct for all of the groups, it signifies that no detectable error has occurred. If one or more of the newly generated parity values are incorrect, a unique pattern called a syndrome results, which may be used to identify the bit in error. Upon detection of the particular bit in error, the error may be corrected by complementing the erroneous bit.

A widely used type of ECC utilized in error control in digital systems is based on the codes devised by R.W. Hamming, and thus take the name “Hamming codes”. One particular subclass of Hamming codes includes the single error correcting and double error detecting (SEC-DED) codes. As their name suggests, these codes may be utilized not only to correct any single bit error but also to detect double bit errors.

Another type of well-known ECC is the single symbol correction and double symbol detection (SSC-DSD) codes, which are used to correct single symbol errors and detect double symbol errors. In systems implementing these types of codes, the symbol represents a multiple bit package or chip. Hence, as the name implies, an SSC-DSD code in a system utilizing n bit symbols would be capable of correcting n bits in a single symbol and detecting errors occurring in double symbols.

Error detecting codes have a low overhead, e.g., 12.5% parity overhead for single byte. Error correcting codes are very inefficient for small data items and are usually used for groups of 8 bytes and larger, e.g., 12.5% overhead for single error correcting, double correcting code on 8 bytes. If a fraction of the group is changed, the unchanged data needs to be retrieved to generate the ECC for the entire group, causing expensive Read-Modify Write cycles.

For example, in a 32-bit ECC scheme, the check bits that are stored with the data are generated based on the entire thirty-two bits. This makes it necessary to regenerate all of the check bits if even one data bit has changed. Thus, if one byte of data needs to be written to memory, the entire 4-byte double word must first be read, checked and corrected, the new eight bits substituted, and then all four bytes must be rewritten to memory with the appropriate new check bits. The same is true if two or three bytes of data need to be written to memory. This is called a partial write or a read/modify/write operation.

A large number of these Read-Modify-Write cycles can cause significant delays in the operation of the memory system. This problem is usually mitigated by implementing write-combine buffers. These buffers collect multiple update requests and combine them, if possible, into larger updates, possibly changing the entire ECC protected group at once.

SUMMARY OF THE INVENTION

An object of this invention is to provide combined group ECC protection and subgroup parity protection.

Another object of the present invention is to generate a code that provides error correction capabilities for a group of data as well as parity protection for fractions of that group.

A further object of the invention is to generate a code that simultaneously represents ECC on a group of bits and parity across subgroups of these bits.

These and other objectives are attained with a method of and system for providing combined error code protection and subgroup parity protection for a given group of n bits. The method comprises the steps of identifying a number, m, of redundant bits for said error protection; and constructing a matrix P, wherein multiplying said given group of n bits with P produces m redundant error correction code (ECC) protection bits, and two columns of P provide parity protection for subgroups of said given group of n bits.

In the preferred embodiment of the invention, the matrix P is constructed by generating permutations of m bit wide vectors with three or more, but an odd number of, elements with value one and the other elements with value zero; and assigning said vectors to rows of the matrix P. Also, preferably, this matrix P fulfills the following conditions: (i) all elements of P are either one or zero; (ii) the elements of columns p0 to pk are non equal to zero for rows for which said columns provide parity protection, and otherwise the elements of said columns p0 to pk are zero; (iii) each row has an odd number of one-elements; and (iv) each row has at least three one-elements.

Further benefits and advantages of the present invention will become apparent from a consideration of the following detailed description, given with reference to the accompanying drawings, which specify and show preferred embodiments of the invention.

BRIEF DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 depicts one example of a computer system in which the present invention may be implemented.

FIG. 2 illustrates one example of a memory arrangement with which the present invention may be used.

FIG. 3 is a block diagram depicting data store and fetch operations implementing a single error correcting double error detecting methodology.

FIG. 4 shows an ECC checkbits generator matrix P which generates ECC protection and parity protection in accordance with the present invention.

FIG. 5 illustrates a parity protected cache line.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows a block diagram representation of a computer system 10 utilizing the error correction code of the present invention. In this embodiment, computer system 10 includes a memory 11 connected to a main storage controller (MSC) 12 via a data bus 15, a cache 13 connected to MSC 12 via a data bus 17, and a plurality of central processing units (CPUs) 14 connected to cache 13 via data buses 17. Data buses 16 and 17 may typically be 72 bits wide. Communication of data between memory 11 and MSC 12, on the other hand, occurs via data bus 15. Thus, data bus 15 facilitates the transmission of data read from memory 11 by MSC 12 as well as data written to memory 11 by MSC 12.

Data bus 15, in one embodiment, is 160 bits wide but nevertheless may vary in width according to the requirements of the particular system while still receiving error protection under the ECC of the present invention. In this regard, the ECC of the present invention is specifically designed to meet the data requirements of a wide variety of servers including data buses having widths of, for example, 140, 142, 143, 144, 152, and 162 bits.

The data transmitted in computer system 10 is arranged into a data word having a size dependent on the particular data bus utilized by the system. Furthermore, the data word may be arranged into variably sized symbols. For instance, in one example, the data word comprises a plurality of two bit symbols. Hence, in this example, a 146-bit data word would include 73 symbols.

With reference to FIG. 2, a representative memory system may use, for example, ten memory chips that are 16 bits wide. Eight chips are used to hold user data, and the remaining two chips contain ECC check information along with system data. Each single memory access returns 160 bits of data, referred to as a line of data. The preferred error correcting code used with the present invention is defined over two sequential memory accesses to all the chips (2 lines), so from the eight user data chips, in total there are 256 (8×16×2) bits of user data. The extra two chips may provide 64 bits (2×16×2) bits, and 54 of these bits may be allocated for ECC check information, leaving ten bits for system information.

FIG. 3 is a block diagram depicting data store and fetch operations implementing a preferred ECC methodology. More specifically, FIG. 3 is a high-level diagram depicting the movement of data through the ECC generation logic, out to memory, back from memory, and through the ECC detection/correction logic. As shown in FIG. 3, the data bits and address parity bits are fed into an ECC generation logic unit 50, implementing a parity check for producing the ECC word comprising the data bits and a group of check bits. The ECC word is stored in a memory storage 51, for example. During a subsequent read operation, the ECC word is fetched from memory 51, and an ECC correction/detection logic unit 52 is implemented to determine if there are any errors. If there are no errors, the data bits are passed on to the next stage in the computer system. If there are errors, the ECC correction/detection logic unit will detect them providing that no more than two symbols are in error, and correct them if a single symbol is in error. The detection/correction logic signals the system via CE and UE signals when a respective “correctable” or “uncorrectable” error occurs.

In accordance with the preferred embodiment of the present invention, the ECC is based on a single error correction double error detect (SECDED) ECC. A group of n bits is protected by m redundant bits using a n×(n+m) generator matrix G=[I_(n) P]. Multiplying an n bit wide data word with P produces the m redundant protection bits. Columns p0 to pk of P are selected to provide parity for subgroups.

P preferably fulfills the following conditions:

-   i) All elements are either 1 or 0; -   ii) The elements of columns p0 to pk must be non-equal to zero for     rows for which they provide parity and zero otherwise; -   iii) Each row must have an odd number of one-elements; and -   iv) Each row must have at least 3 one-elements.

P is constructed by generating permutations of m bit wide vectors with 3 or more, but an odd number of, elements with value one and the other elements of value 0. These vectors are assigned to rows of P while adhering to the above conditions. If not all rows of P can be assigned, m needs to be increased by one and the entire process needs to be restarted.

FIG. 4 shows, as a preferred embodiment, a checkbits generator matrix P that provides SECDED ECC protection for 64 b groups. The columns p0 and p1 of the matrix generate parity for the first 32 b of the group while columns p2 and p3 provide parity protection for the second 32 b subgroup.

Also, in accordance with a preferred embodiment of the invention, a storage subsystem is provided that can take advantage of the properties of the above ECC code as follows:

-   i) If an entire n-bit group is changed, the m-bit ECC for this group     is generated and stored along with the group; -   ii) If only a fraction of the group, but one or multiple entire,     parity protected subgroups are changed, only this fraction and the     parity bits protecting them are stored, the rest remains unchanged.     The entire group is now only protected by the parity bits generated     by columns p0 to pk. The fact that only parity protection is valid     is recorded for this group or for the storage region including this     group; and -   iii) In all other cases, the unmodified components of the group are     first read and merged with the modified content. Then the entire     m-bit ECC for this group is generated and stored along with the     group.

When retrieving data and ECC, the information indicating whether this group is only parity protected is also retrieved. If it is only parity protected, only the bits generated by columns p0 to pk are checked and an uncorrectable error is signaled in case of a mismatch. Otherwise, error detection and correction can proceed as for a regular SECDED ECC.

To balance the need of high throughput subgroup modifications avoiding RMW cycles with data protection of a correcting code, the storage can be scrubbed periodically to convert parity-only protected data to ECC protected data.

FIG. 5 shows a preferred embodiment. A cache stores its cache lines along with ECC checkbits. It also stores a parity-protect bit for each cache line in its directory that determines if at least one fraction of the line is protected by parity only. The parity protect bit is set to ‘0’ when the line is established on a miss and fetched from main memory. It is set to ‘1’ whenever only a 32 b word is written to the cache line. It is cleared when a background scrub process, which continuously scans the directory for asserted parity-protect bits, reads a whole line, regenerates all ECC fields and writes the line back into the cache.

As will be readily apparent to those skilled in the art, the present invention or aspects of the invention can be realized in hardware, software, or a combination of hardware and software. Any kind of computer/server system(s)—or other apparatus adapted for carrying out the methods described herein—is suited. A typical combination of hardware and software could be a general-purpose computer system with a computer program that, when loaded and executed, carries out methods described herein. Alternatively, a specific use computer, containing specialized hardware for carrying out one or more of the functional tasks of the invention, could be utilized.

The present invention or aspects of the invention can also be embodied in a computer program product, which comprises all the respective features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods. Computer program, software program, program, or software, in the present context mean any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form.

While it is apparent that the invention herein disclosed is well calculated to fulfill the objects stated above, it will be appreciated that numerous modifications and embodiments may be devised by those skilled in the art, and it is intended that the appended claims cover all such modifications and embodiments as fall within the true spirit and scope of the present invention. 

What is claimed is:
 1. A method of generating a matrix P to provide an error correction code (ECC) word for a given group of n bits and to provide parity bits for subgroups of said given group of n bits, the matrix P including a multitude of rows and columns, the method comprising the steps of: generating permutations of m bit wide vectors, each of the vectors having an odd number of three or more elements with a value of one and the other elements with a value zero; assigning the permutations to rows of the matrix P while adhering to a defined group of conditions; and if not all the rows of P are assigned, increasing m, and repeating the generating and assigning steps; and wherein multiplying said given group of n bits with P produces m error correction code protection bits, and two of the columns of P provide parity bits for parity protection for subgroups of said given group of n bits.
 2. The method according to claim 1, wherein the group of conditions include: all elements of P are either one or zero.
 3. The method according to claim 2, wherein the group of conditions further include: the elements of columns p0 to pk of P are non-equal to zero for rows for which said columns provide parity protection, and otherwise the elements of said columns p0 to pk are zero.
 4. The method according to claim 3, wherein the group of conditions further includes: each row has an odd number of one-elements.
 5. The method according to claim 4, wherein the group of conditions further includes: each row has at least three one-elements.
 6. A method according to claim 5, wherein a first and second columns of P generate the parity bits for a first subgroup of said group of n bits.
 7. A method according to claim 6, wherein a third and fourth columns of P generate the parity bits for a second subgroup of said group of n bits.
 8. A computer system for generating a matrix P to provide an error correction code (ECC) word for a given group of n bits and to provide parity bits for subgroups of said given group of n bits, the matrix P including a multitude of rows and columns, the computer system comprising: a memory unit for storing data; One or more processing units coupled to the memory and configured for: generating permutations of m bit wide vectors, each of the vectors having an odd number of three or more elements with a value of one and the other elements with a value zero; assigning the permutations to rows of the matrix P while adhering to a defined group of conditions; and if not all the rows of P are assigned, increasing m, and repeating the generating and assigning steps; and wherein multiplying said given group of n bits with P produces m error correction code protection bits, and two of the columns of P provide parity bits for parity protection for subgroups of said given group of n bits.
 9. The computer system according to claim 8, wherein the group of conditions include: all elements of P are either one or zero.
 10. The computer system according to claim 9, wherein the group of conditions further include: the elements of columns p0 to pk of P are non-equal to zero for rows for which said columns provide parity protection, and otherwise the elements of said columns p0 to pk are zero.
 11. The computer system according to claim 10, wherein the group of conditions further includes: each row has an odd number of one-elements.
 12. The computer system according to claim 11, wherein the group of conditions further includes: each row has at least three one-elements.
 13. The computer system according to claim 12, wherein a first and second columns of P generate the parity bits for a first subgroup of said group of n bits.
 14. The computer system according to claim 13, wherein a third and fourth columns of P generate the parity bits for a second subgroup of said group of n bits.
 15. A computer readable storage device, tangibly embodying a program of instructions executable by a computer to perform method steps for generating a matrix P to provide an error correction code (ECC) for a given group of n bits and to provide parity bits for subgroups of said given group of n bits, the matrix P including a multitude of rows and columns, said method steps comprising: generating permutations of m bit wide vectors, each of the vectors having an odd number of three or more elements with a value of one and the other elements with a value zero; assigning the permutations to rows of the matrix P while adhering to a defined group of conditions; and if not all the rows of P are assigned, increasing m, and repeating the generating and assigning steps; and wherein multiplying said given group of n bits with P produces m error correction code protection bits, and two of the columns of P provide parity bits for parity protection for subgroups of said given group of n bits.
 16. The computer readable storage device according to claim 15, wherein the group of conditions include: all elements of P are either one or zero.
 17. The computer readable storage device according to claim 16, wherein the group of conditions further include: the elements of columns p0 to pk of P are non-equal to zero for rows for which said columns provide parity protection, and otherwise the elements of said columns p0 to pk are zero.
 18. The computer readable storage device according to claim 17, wherein the group of conditions further includes: each row has an odd number of one-elements.
 19. The computer readable storage device according to claim 18, wherein the group of conditions further includes: each row has at least three one-elements.
 20. The computer readable storage device according to claim 19, wherein: a first and second columns of P generate the parity bits for a first subgroup of said group of n bits; and a third and fourth columns of P generate the parity bits for a second subgroup of said group of n bits. 